﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ServerProject
{
    [Serializable()]
    class FILE
    {
        private int fileID;
        private string fileName;
        private string filePath;
        private DateTime fileDTComplete;
        private string fileState;

        public FILE()
        {
            fileID = -1;
            fileName = "";
            filePath = "";
            fileState = "READY";
        }

        public FILE(int id, string file, string state)
        {
            fileID = id;
            fileState = state;
            int index = file.LastIndexOf('\\');
            if (index > -1)
            {
                index = index + 1;
                fileName = file.Substring(index, file.Length - index);
                filePath = file.Substring(0, index);
            }
        }

        public int FileID
        {
            get { return fileID; }
            set { fileID = value; }
        }

        public string FileName
        {
            get { return fileName; }
            set { fileName = value; }
        }

        public string FilePath
        {
            get { return filePath; }
            set { filePath = value; }
        }

        public DateTime FileDTComplete
        {
            get { return fileDTComplete; }
            set { fileDTComplete = value; }
        }

        public string FileState
        {
            get { return fileState; }
            set { fileState = value; }
        }
    }
}
